package mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import entity.Post;

public interface PostMapper {
	int insert (Post post);
	Post SelectByiId(Long id);
	int update(Post post);
	int delete(Long postId);
	void incrementCommentCount(Long postId);
	void decrementLikeCount(Long postId);
	List<Post> selectByUserId(@Param("userId") Long userId, 
			 				@Param("offset") int offset, 
			 				@Param("pageSize") int pageSize);
	Post selectById(Long postId);
	List<Post> selectByPage(int offset, int pageSize, String orderBy);
	 


}
